home *** CD-ROM | disk | FTP | other *** search
- // Borland C++ Builder
- // Copyright (c) 1995, 1998 by Borland International
- // All rights reserved
-
- // (DO NOT EDIT: machine generated header) 'VCLUnZip.pas' rev: 3.00
-
- #ifndef VCLUnZipHPP
- #define VCLUnZipHPP
- #include <kpZcnst.hpp>
- #include <kpZipObj.hpp>
- #include <KpLib.hpp>
- #include <kpMatch.hpp>
- #include <kpCntn.hpp>
- #include <FileCtrl.hpp>
- #include <Dialogs.hpp>
- #include <Forms.hpp>
- #include <Controls.hpp>
- #include <Classes.hpp>
- #include <SysUtils.hpp>
- #include <Windows.hpp>
- #include <SysInit.hpp>
- #include <System.hpp>
-
- //-- user supplied -----------------------------------------------------------
-
- namespace Vclunzip
- {
- //-- type declarations -------------------------------------------------------
- enum TMultiMode { mmNone, mmSpan, mmBlocks };
-
- enum TIncompleteZipMode { izAssumeMulti, izAssumeBad, izAssumeNotAZip };
-
- enum TUZOverwriteMode { Prompt, Always, Never, ifNewer, ifOlder };
-
- enum TSkipReason { srBadPassword, srNoOverwrite, srFileOpenError, srCreateError };
-
- typedef int DecryptKey[3];
-
- typedef Byte DecryptHeaderType[12];
-
- typedef DecryptHeaderType *DecryptHeaderPtr;
-
- class DELPHICLASS EBadZipFile;
- class PASCALIMPLEMENTATION EBadZipFile : public Sysutils::Exception
- {
- typedef Sysutils::Exception inherited;
-
- public:
- /* Exception.Create */ __fastcall EBadZipFile(const System::AnsiString Msg) : Sysutils::Exception(Msg
- ) { }
- /* Exception.CreateFmt */ __fastcall EBadZipFile(const System::AnsiString Msg, const System::TVarRec
- * Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
- /* Exception.CreateRes */ __fastcall EBadZipFile(int Ident, Extended Dummy) : Sysutils::Exception(Ident
- , Dummy) { }
- /* Exception.CreateResFmt */ __fastcall EBadZipFile(int Ident, const System::TVarRec * Args, const
- int Args_Size) : Sysutils::Exception(Ident, Args, Args_Size) { }
- /* Exception.CreateHelp */ __fastcall EBadZipFile(const System::AnsiString Msg, int AHelpContext) :
- Sysutils::Exception(Msg, AHelpContext) { }
- /* Exception.CreateFmtHelp */ __fastcall EBadZipFile(const System::AnsiString Msg, const System::TVarRec
- * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext
- ) { }
- /* Exception.CreateResHelp */ __fastcall EBadZipFile(int Ident, int AHelpContext) : Sysutils::Exception(
- Ident, AHelpContext) { }
- /* Exception.CreateResFmtHelp */ __fastcall EBadZipFile(int Ident, const System::TVarRec * Args, const
- int Args_Size, int AHelpContext) : Sysutils::Exception(Ident, Args, Args_Size, AHelpContext) { }
-
- public:
- /* TObject.Destroy */ __fastcall virtual ~EBadZipFile(void) { }
-
- };
-
- class DELPHICLASS EFileNotAllThere;
- class PASCALIMPLEMENTATION EFileNotAllThere : public Sysutils::Exception
- {
- typedef Sysutils::Exception inherited;
-
- public:
- /* Exception.Create */ __fastcall EFileNotAllThere(const System::AnsiString Msg) : Sysutils::Exception(
- Msg) { }
- /* Exception.CreateFmt */ __fastcall EFileNotAllThere(const System::AnsiString Msg, const System::TVarRec
- * Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
- /* Exception.CreateRes */ __fastcall EFileNotAllThere(int Ident, Extended Dummy) : Sysutils::Exception(
- Ident, Dummy) { }
- /* Exception.CreateResFmt */ __fastcall EFileNotAllThere(int Ident, const System::TVarRec * Args, const
- int Args_Size) : Sysutils::Exception(Ident, Args, Args_Size) { }
- /* Exception.CreateHelp */ __fastcall EFileNotAllThere(const System::AnsiString Msg, int AHelpContext
- ) : Sysutils::Exception(Msg, AHelpContext) { }
- /* Exception.CreateFmtHelp */ __fastcall EFileNotAllThere(const System::AnsiString Msg, const System::TVarRec
- * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext
- ) { }
- /* Exception.CreateResHelp */ __fastcall EFileNotAllThere(int Ident, int AHelpContext) : Sysutils::
- Exception(Ident, AHelpContext) { }
- /* Exception.CreateResFmtHelp */ __fastcall EFileNotAllThere(int Ident, const System::TVarRec * Args
- , const int Args_Size, int AHelpContext) : Sysutils::Exception(Ident, Args, Args_Size, AHelpContext
- ) { }
-
- public:
- /* TObject.Destroy */ __fastcall virtual ~EFileNotAllThere(void) { }
-
- };
-
- class DELPHICLASS EIncompleteZip;
- class PASCALIMPLEMENTATION EIncompleteZip : public Sysutils::Exception
- {
- typedef Sysutils::Exception inherited;
-
- public:
- /* Exception.Create */ __fastcall EIncompleteZip(const System::AnsiString Msg) : Sysutils::Exception(
- Msg) { }
- /* Exception.CreateFmt */ __fastcall EIncompleteZip(const System::AnsiString Msg, const System::TVarRec
- * Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
- /* Exception.CreateRes */ __fastcall EIncompleteZip(int Ident, Extended Dummy) : Sysutils::Exception(
- Ident, Dummy) { }
- /* Exception.CreateResFmt */ __fastcall EIncompleteZip(int Ident, const System::TVarRec * Args, const
- int Args_Size) : Sysutils::Exception(Ident, Args, Args_Size) { }
- /* Exception.CreateHelp */ __fastcall EIncompleteZip(const System::AnsiString Msg, int AHelpContext
- ) : Sysutils::Exception(Msg, AHelpContext) { }
- /* Exception.CreateFmtHelp */ __fastcall EIncompleteZip(const System::AnsiString Msg, const System::TVarRec
- * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext
- ) { }
- /* Exception.CreateResHelp */ __fastcall EIncompleteZip(int Ident, int AHelpContext) : Sysutils::Exception(
- Ident, AHelpContext) { }
- /* Exception.CreateResFmtHelp */ __fastcall EIncompleteZip(int Ident, const System::TVarRec * Args,
- const int Args_Size, int AHelpContext) : Sysutils::Exception(Ident, Args, Args_Size, AHelpContext)
- { }
-
- public:
- /* TObject.Destroy */ __fastcall virtual ~EIncompleteZip(void) { }
-
- };
-
- class DELPHICLASS ENotAZipFile;
- class PASCALIMPLEMENTATION ENotAZipFile : public Sysutils::Exception
- {
- typedef Sysutils::Exception inherited;
-
- public:
- /* Exception.Create */ __fastcall ENotAZipFile(const System::AnsiString Msg) : Sysutils::Exception(
- Msg) { }
- /* Exception.CreateFmt */ __fastcall ENotAZipFile(const System::AnsiString Msg, const System::TVarRec
- * Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
- /* Exception.CreateRes */ __fastcall ENotAZipFile(int Ident, Extended Dummy) : Sysutils::Exception(
- Ident, Dummy) { }
- /* Exception.CreateResFmt */ __fastcall ENotAZipFile(int Ident, const System::TVarRec * Args, const
- int Args_Size) : Sysutils::Exception(Ident, Args, Args_Size) { }
- /* Exception.CreateHelp */ __fastcall ENotAZipFile(const System::AnsiString Msg, int AHelpContext) :
- Sysutils::Exception(Msg, AHelpContext) { }
- /* Exception.CreateFmtHelp */ __fastcall ENotAZipFile(const System::AnsiString Msg, const System::TVarRec
- * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext
- ) { }
- /* Exception.CreateResHelp */ __fastcall ENotAZipFile(int Ident, int AHelpContext) : Sysutils::Exception(
- Ident, AHelpContext) { }
- /* Exception.CreateResFmtHelp */ __fastcall ENotAZipFile(int Ident, const System::TVarRec * Args, const
- int Args_Size, int AHelpContext) : Sysutils::Exception(Ident, Args, Args_Size, AHelpContext) { }
-
- public:
- /* TObject.Destroy */ __fastcall virtual ~ENotAZipFile(void) { }
-
- };
-
- class DELPHICLASS EFatalUnzipError;
- class PASCALIMPLEMENTATION EFatalUnzipError : public Sysutils::Exception
- {
- typedef Sysutils::Exception inherited;
-
- public:
- /* Exception.Create */ __fastcall EFatalUnzipError(const System::AnsiString Msg) : Sysutils::Exception(
- Msg) { }
- /* Exception.CreateFmt */ __fastcall EFatalUnzipError(const System::AnsiString Msg, const System::TVarRec
- * Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
- /* Exception.CreateRes */ __fastcall EFatalUnzipError(int Ident, Extended Dummy) : Sysutils::Exception(
- Ident, Dummy) { }
- /* Exception.CreateResFmt */ __fastcall EFatalUnzipError(int Ident, const System::TVarRec * Args, const
- int Args_Size) : Sysutils::Exception(Ident, Args, Args_Size) { }
- /* Exception.CreateHelp */ __fastcall EFatalUnzipError(const System::AnsiString Msg, int AHelpContext
- ) : Sysutils::Exception(Msg, AHelpContext) { }
- /* Exception.CreateFmtHelp */ __fastcall EFatalUnzipError(const System::AnsiString Msg, const System::TVarRec
- * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext
- ) { }
- /* Exception.CreateResHelp */ __fastcall EFatalUnzipError(int Ident, int AHelpContext) : Sysutils::
- Exception(Ident, AHelpContext) { }
- /* Exception.CreateResFmtHelp */ __fastcall EFatalUnzipError(int Ident, const System::TVarRec * Args
- , const int Args_Size, int AHelpContext) : Sysutils::Exception(Ident, Args, Args_Size, AHelpContext
- ) { }
-
- public:
- /* TObject.Destroy */ __fastcall virtual ~EFatalUnzipError(void) { }
-
- };
-
- class DELPHICLASS EUserCanceled;
- class PASCALIMPLEMENTATION EUserCanceled : public Sysutils::Exception
- {
- typedef Sysutils::Exception inherited;
-
- public:
- /* Exception.Create */ __fastcall EUserCanceled(const System::AnsiString Msg) : Sysutils::Exception(
- Msg) { }
- /* Exception.CreateFmt */ __fastcall EUserCanceled(const System::AnsiString Msg, const System::TVarRec
- * Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
- /* Exception.CreateRes */ __fastcall EUserCanceled(int Ident, Extended Dummy) : Sysutils::Exception(
- Ident, Dummy) { }
- /* Exception.CreateResFmt */ __fastcall EUserCanceled(int Ident, const System::TVarRec * Args, const
- int Args_Size) : Sysutils::Exception(Ident, Args, Args_Size) { }
- /* Exception.CreateHelp */ __fastcall EUserCanceled(const System::AnsiString Msg, int AHelpContext)
- : Sysutils::Exception(Msg, AHelpContext) { }
- /* Exception.CreateFmtHelp */ __fastcall EUserCanceled(const System::AnsiString Msg, const System::TVarRec
- * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext
- ) { }
- /* Exception.CreateResHelp */ __fastcall EUserCanceled(int Ident, int AHelpContext) : Sysutils::Exception(
- Ident, AHelpContext) { }
- /* Exception.CreateResFmtHelp */ __fastcall EUserCanceled(int Ident, const System::TVarRec * Args,
- const int Args_Size, int AHelpContext) : Sysutils::Exception(Ident, Args, Args_Size, AHelpContext)
- { }
-
- public:
- /* TObject.Destroy */ __fastcall virtual ~EUserCanceled(void) { }
-
- };
-
- class DELPHICLASS EInvalidPassword;
- class PASCALIMPLEMENTATION EInvalidPassword : public Sysutils::Exception
- {
- typedef Sysutils::Exception inherited;
-
- public:
- /* Exception.Create */ __fastcall EInvalidPassword(const System::AnsiString Msg) : Sysutils::Exception(
- Msg) { }
- /* Exception.CreateFmt */ __fastcall EInvalidPassword(const System::AnsiString Msg, const System::TVarRec
- * Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
- /* Exception.CreateRes */ __fastcall EInvalidPassword(int Ident, Extended Dummy) : Sysutils::Exception(
- Ident, Dummy) { }
- /* Exception.CreateResFmt */ __fastcall EInvalidPassword(int Ident, const System::TVarRec * Args, const
- int Args_Size) : Sysutils::Exception(Ident, Args, Args_Size) { }
- /* Exception.CreateHelp */ __fastcall EInvalidPassword(const System::AnsiString Msg, int AHelpContext
- ) : Sysutils::Exception(Msg, AHelpContext) { }
- /* Exception.CreateFmtHelp */ __fastcall EInvalidPassword(const System::AnsiString Msg, const System::TVarRec
- * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext
- ) { }
- /* Exception.CreateResHelp */ __fastcall EInvalidPassword(int Ident, int AHelpContext) : Sysutils::
- Exception(Ident, AHelpContext) { }
- /* Exception.CreateResFmtHelp */ __fastcall EInvalidPassword(int Ident, const System::TVarRec * Args
- , const int Args_Size, int AHelpContext) : Sysutils::Exception(Ident, Args, Args_Size, AHelpContext
- ) { }
-
- public:
- /* TObject.Destroy */ __fastcall virtual ~EInvalidPassword(void) { }
-
- };
-
- class DELPHICLASS EBiggerThanUncompressed;
- class PASCALIMPLEMENTATION EBiggerThanUncompressed : public Sysutils::Exception
- {
- typedef Sysutils::Exception inherited;
-
- public:
- /* Exception.Create */ __fastcall EBiggerThanUncompressed(const System::AnsiString Msg) : Sysutils::
- Exception(Msg) { }
- /* Exception.CreateFmt */ __fastcall EBiggerThanUncompressed(const System::AnsiString Msg, const System::TVarRec
- * Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
- /* Exception.CreateRes */ __fastcall EBiggerThanUncompressed(int Ident, Extended Dummy) : Sysutils::
- Exception(Ident, Dummy) { }
- /* Exception.CreateResFmt */ __fastcall EBiggerThanUncompressed(int Ident, const System::TVarRec *
- Args, const int Args_Size) : Sysutils::Exception(Ident, Args, Args_Size) { }
- /* Exception.CreateHelp */ __fastcall EBiggerThanUncompressed(const System::AnsiString Msg, int AHelpContext
- ) : Sysutils::Exception(Msg, AHelpContext) { }
- /* Exception.CreateFmtHelp */ __fastcall EBiggerThanUncompressed(const System::AnsiString Msg, const
- System::TVarRec * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size
- , AHelpContext) { }
- /* Exception.CreateResHelp */ __fastcall EBiggerThanUncompressed(int Ident, int AHelpContext) : Sysutils::
- Exception(Ident, AHelpContext) { }
- /* Exception.CreateResFmtHelp */ __fastcall EBiggerThanUncompressed(int Ident, const System::TVarRec
- * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Ident, Args, Args_Size, AHelpContext
- ) { }
-
- public:
- /* TObject.Destroy */ __fastcall virtual ~EBiggerThanUncompressed(void) { }
-
- };
-
- class DELPHICLASS ENotEnoughRoom;
- class PASCALIMPLEMENTATION ENotEnoughRoom : public Sysutils::Exception
- {
- typedef Sysutils::Exception inherited;
-
- public:
- /* Exception.Create */ __fastcall ENotEnoughRoom(const System::AnsiString Msg) : Sysutils::Exception(
- Msg) { }
- /* Exception.CreateFmt */ __fastcall ENotEnoughRoom(const System::AnsiString Msg, const System::TVarRec
- * Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
- /* Exception.CreateRes */ __fastcall ENotEnoughRoom(int Ident, Extended Dummy) : Sysutils::Exception(
- Ident, Dummy) { }
- /* Exception.CreateResFmt */ __fastcall ENotEnoughRoom(int Ident, const System::TVarRec * Args, const
- int Args_Size) : Sysutils::Exception(Ident, Args, Args_Size) { }
- /* Exception.CreateHelp */ __fastcall ENotEnoughRoom(const System::AnsiString Msg, int AHelpContext
- ) : Sysutils::Exception(Msg, AHelpContext) { }
- /* Exception.CreateFmtHelp */ __fastcall ENotEnoughRoom(const System::AnsiString Msg, const System::TVarRec
- * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext
- ) { }
- /* Exception.CreateResHelp */ __fastcall ENotEnoughRoom(int Ident, int AHelpContext) : Sysutils::Exception(
- Ident, AHelpContext) { }
- /* Exception.CreateResFmtHelp */ __fastcall ENotEnoughRoom(int Ident, const System::TVarRec * Args,
- const int Args_Size, int AHelpContext) : Sysutils::Exception(Ident, Args, Args_Size, AHelpContext)
- { }
-
- public:
- /* TObject.Destroy */ __fastcall virtual ~ENotEnoughRoom(void) { }
-
- };
-
- class DELPHICLASS ECantWriteUCF;
- class PASCALIMPLEMENTATION ECantWriteUCF : public Sysutils::Exception
- {
- typedef Sysutils::Exception inherited;
-
- public:
- /* Exception.Create */ __fastcall ECantWriteUCF(const System::AnsiString Msg) : Sysutils::Exception(
- Msg) { }
- /* Exception.CreateFmt */ __fastcall ECantWriteUCF(const System::AnsiString Msg, const System::TVarRec
- * Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
- /* Exception.CreateRes */ __fastcall ECantWriteUCF(int Ident, Extended Dummy) : Sysutils::Exception(
- Ident, Dummy) { }
- /* Exception.CreateResFmt */ __fastcall ECantWriteUCF(int Ident, const System::TVarRec * Args, const
- int Args_Size) : Sysutils::Exception(Ident, Args, Args_Size) { }
- /* Exception.CreateHelp */ __fastcall ECantWriteUCF(const System::AnsiString Msg, int AHelpContext)
- : Sysutils::Exception(Msg, AHelpContext) { }
- /* Exception.CreateFmtHelp */ __fastcall ECantWriteUCF(const System::AnsiString Msg, const System::TVarRec
- * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext
- ) { }
- /* Exception.CreateResHelp */ __fastcall ECantWriteUCF(int Ident, int AHelpContext) : Sysutils::Exception(
- Ident, AHelpContext) { }
- /* Exception.CreateResFmtHelp */ __fastcall ECantWriteUCF(int Ident, const System::TVarRec * Args,
- const int Args_Size, int AHelpContext) : Sysutils::Exception(Ident, Args, Args_Size, AHelpContext)
- { }
-
- public:
- /* TObject.Destroy */ __fastcall virtual ~ECantWriteUCF(void) { }
-
- };
-
- typedef void __fastcall (__closure *TStartUnzipInfo)(System::TObject* Sender, int NumFiles, double TotalBytes
- , bool &StopNow);
-
- typedef void __fastcall (__closure *TStartUnZipEvent)(System::TObject* Sender, int FileIndex, System::AnsiString
- &FName, bool &Skip);
-
- typedef void __fastcall (__closure *TEndUnZipEvent)(System::TObject* Sender, int FileIndex, System::AnsiString
- FName);
-
- typedef void __fastcall (__closure *TFilePercentDone)(System::TObject* Sender, int Percent);
-
- typedef void __fastcall (__closure *TTotalPercentDone)(System::TObject* Sender, int Percent);
-
- typedef void __fastcall (__closure *TPromptForOverwrite)(System::TObject* Sender, bool &OverWriteIt,
- int FileIndex, System::AnsiString &FName);
-
- typedef void __fastcall (__closure *TSkippingFile)(System::TObject* Sender, TSkipReason Reason, System::AnsiString
- FName, int FileIndex, bool &Retry);
-
- typedef void __fastcall (__closure *TBadPassword)(System::TObject* Sender, int FileIndex, System::AnsiString
- &NewPassword);
-
- typedef void __fastcall (__closure *TBadCRC)(System::TObject* Sender, int CalcCRC, int StoredCRC, int
- FileIndex);
-
- typedef void __fastcall (__closure *TIncompleteZip)(System::TObject* Sender, TIncompleteZipMode &IncompleteMode
- );
-
- typedef void __fastcall (__closure *TGetNextDisk)(System::TObject* Sender, int NextDisk, System::AnsiString
- &FName);
-
- typedef void __fastcall (__closure *TUnZipComplete)(System::TObject* sender, int FileCount);
-
- typedef void __fastcall (__closure *TGetNextBuffer)(System::TObject* Sender, char * &Buffer, System::AnsiString
- FName, int AmountUsed, int BufferNum, bool &Quit);
-
- class DELPHICLASS TVCLUnZip;
- class PASCALIMPLEMENTATION TVCLUnZip : public Classes::TComponent
- {
- typedef Classes::TComponent inherited;
-
- private:
- System::AnsiString FZipName;
- System::AnsiString FDestDir;
- TZipSortMode FSortMode;
- bool FReCreateDir;
- TUZOverwriteMode FOverwriteMode;
- Classes::TStrings* FFilesList;
- bool FDoAll;
- System::AnsiString FPassword;
- TIncompleteZipMode FIncompleteZipMode;
- bool FKeepZipOpen;
- bool FDoProcessMessages;
- int FNumDisks;
- bool FRetainAttributes;
- int FThisVersion;
- bool FReplaceReadOnly;
- int FNumSelected;
- int FBufferLength;
- bool FImproperZip;
- TStartUnzipInfo FOnStartUnzipInfo;
- TStartUnZipEvent FOnStartUnZip;
- TEndUnZipEvent FOnEndUnZip;
- TPromptForOverwrite FOnPromptForOverwrite;
- TBadPassword FOnBadPassword;
- TBadCRC FOnBadCRC;
- TIncompleteZip FOnInCompleteZip;
- TUnZipComplete FOnUnzipComplete;
- TGetNextBuffer FOnGetNextBuffer;
- bool __fastcall ProcessIntegrityCheck(int Index);
-
- protected:
- TFilePercentDone FOnFilePercentDone;
- TTotalPercentDone FOnTotalPercentDone;
- TSkippingFile FOnSkippingFile;
- TGetNextDisk FOnGetNextDisk;
- Classes::TStream* FArchiveStream;
- bool FBusy;
- System::AnsiString FRootDir;
- bool FTestMode;
- bool FFlushFilesOnClose;
- int FBufferedStreamSize;
- bool ArchiveIsStream;
- bool FCheckDiskLabels;
- TMultiMode FMultiMode;
- Kpzipobj::TZipHeaderInfo* file_info;
- Kpzipobj::TSortedZip* files;
- Kpzipobj::TSortedZip* sortfiles;
- System::TDateTime filesDate;
- bool ZipIsBad;
- int CurrentDisk;
- Classes::TStream* theZipFile;
- int Crc32Val;
- Kpzipobj::local_file_header lrec;
- Kpzipobj::central_file_header crec;
- Kpzipobj::TEndCentral* ecrec;
- int ZipCommentPos;
- bool UnZippingSelected;
- System::AnsiString tmpMStr;
- int Key[3];
- bool CancelOperation;
- Classes::TStream* ZipStream;
- bool StreamZipping;
- bool MemZipping;
- char *MemBuffer;
- int MemLen;
- int MemLeft;
- char *CurrMem;
- bool Fixing;
- bool DR;
- double TotalUncompressedSize;
- double TotalBytesDone;
- void __fastcall OpenZip(void);
- void __fastcall CloseZip(void);
- int __fastcall GetCount(void);
- void __fastcall GetFileInfo(Classes::TStream* infofile);
- System::AnsiString __fastcall GetZipName(void);
- virtual void __fastcall SetZipName(System::AnsiString ZName);
- void __fastcall SetArchiveStream(Classes::TStream* theStream);
- System::AnsiString __fastcall GetDestDir(void);
- void __fastcall SetDestDir(System::AnsiString DDir);
- void __fastcall SetRootDir(System::AnsiString Value);
- int __fastcall UnZipFiles(Classes::TStream* zip_in_file);
- int __fastcall UpdCRC(Byte Octet, int Crc);
- Classes::TStream* __fastcall SwapDisk(int NewDisk);
- void __fastcall SetFileComment(int Index, System::AnsiString theComment);
- void __fastcall SetZipComment(System::AnsiString theComment);
- void __fastcall WriteNumDisks(int NumberOfDisks);
- void __fastcall NewDiskEvent(System::TObject* Sender, Classes::TStream* &S);
- void __fastcall SetThisVersion(int v);
- virtual bool __fastcall GetCheckDiskLabels(void);
- virtual void __fastcall SetCheckDiskLabels(bool Value);
- virtual TMultiMode __fastcall GetMultiMode(void);
- virtual void __fastcall SetMultiMode(TMultiMode Value);
- void __fastcall SetFilesList(Classes::TStrings* Value);
- System::AnsiString __fastcall GetFilename(int Index);
- System::AnsiString __fastcall GetPathname(int Index);
- System::AnsiString __fastcall GetFullname(int Index);
- Word __fastcall GetCompressMethod(int Index);
- System::AnsiString __fastcall GetCompressMethodStr(int Index);
- System::TDateTime __fastcall GetDateTime(int Index);
- int __fastcall GetCrc(int Index);
- int __fastcall GetCompressedSize(int Index);
- int __fastcall GetUnCompressedSize(int Index);
- int __fastcall GetExternalFileAttributes(int Index);
- bool __fastcall GetIsEncrypted(int Index);
- bool __fastcall GetHasComment(int Index);
- System::AnsiString __fastcall GetFileComment(int Index);
- bool __fastcall GetFileIsOK(int Index);
- int __fastcall GetDiskNo(int Index);
- bool __fastcall GetSelected(int Index);
- void __fastcall SetSelected(int Index, bool Value);
- bool __fastcall GetZipHasComment(void);
- System::AnsiString __fastcall GetZipComment(void);
- int __fastcall GetZipSize(void);
- Byte __fastcall DecryptTheHeader(System::AnsiString Passwrd, Classes::TStream* zfile);
- void __fastcall update_keys(char ch);
- Byte __fastcall decrypt_byte(void);
- void __fastcall Init_Keys(System::AnsiString Passwrd);
- void __fastcall decrypt_buff(Windows::PByte bufptr, int num_to_decrypt);
- void __fastcall Update_CRC_buff(Windows::PByte bufptr, int num_to_update);
- void __fastcall DefaultGetNextDisk(System::TObject* Sender, int NextDisk, System::AnsiString &FName
- );
- virtual void __fastcall Loaded(void);
-
- public:
- __fastcall virtual TVCLUnZip(Classes::TComponent* AOwner);
- __fastcall virtual ~TVCLUnZip(void);
- virtual void __fastcall Assign(Classes::TPersistent* Source);
- void __fastcall ReadZip(void);
- int __fastcall UnZip(void);
- int __fastcall UnZipSelected(void);
- void __fastcall ClearSelected(void);
- void __fastcall ClearZip(void);
- void __fastcall FillList(Classes::TStrings* FilesList);
- void __fastcall Sort(Kpzipobj::TZipSortMode SMode);
- void __fastcall CancelTheOperation(void);
- void __fastcall AskForNewDisk(int NewDisk);
- int __fastcall UnZipToStream(Classes::TStream* theStream, System::AnsiString FName);
- int __fastcall UnZipToStreamByIndex(Classes::TStream* theStream, int Index);
- int __fastcall UnZipToBuffer(char * &Buffer, System::AnsiString FName);
- int __fastcall UnZipToBufferByIndex(char * &Buffer, int Index);
- void __fastcall ResetFileIsOK(int Index);
- bool __fastcall CheckArchive(void);
- Byte __fastcall DecryptHeaderByte(System::AnsiString Passwrd, const Byte * dh);
- void __fastcall GetDecryptHeaderPtr(int Index, Windows::PByte dhPtr);
- Byte __fastcall DecryptHeaderByteByPtr(System::AnsiString Passwrd, Windows::PByte dh);
- __property Classes::TStream* ArchiveStream = {read=theZipFile, write=SetArchiveStream};
- __property int Count = {read=GetCount, nodefault};
- __property System::AnsiString Filename[int Index] = {read=GetFilename};
- __property System::AnsiString Pathname[int Index] = {read=GetPathname};
- __property System::AnsiString FullName[int Index] = {read=GetFullname};
- __property Word CompressMethod[int Index] = {read=GetCompressMethod};
- __property System::AnsiString CompressMethodStr[int Index] = {read=GetCompressMethodStr};
- __property System::TDateTime DateTime[int Index] = {read=GetDateTime};
- __property int Crc[int Index] = {read=GetCrc};
- __property int CompressedSize[int Index] = {read=GetCompressedSize};
- __property int UnCompressedSize[int Index] = {read=GetUnCompressedSize};
- __property int ExternalFileAttributes[int Index] = {read=GetExternalFileAttributes};
- __property bool IsEncrypted[int Index] = {read=GetIsEncrypted};
- __property bool FileHasComment[int Index] = {read=GetHasComment};
- __property System::AnsiString FileComment[int Index] = {read=GetFileComment};
- __property bool FileIsOK[int Index] = {read=GetFileIsOK};
- __property int DiskNo[int Index] = {read=GetDiskNo};
- __property bool Selected[int Index] = {read=GetSelected, write=SetSelected};
- __property System::AnsiString ZipComment = {read=GetZipComment};
- __property System::AnsiString Password = {read=FPassword, write=FPassword};
- __property bool ZipHasComment = {read=GetZipHasComment, nodefault};
- __property int NumDisks = {read=FNumDisks, nodefault};
- __property int ZipSize = {read=GetZipSize, nodefault};
- __property bool CheckDiskLabels = {read=GetCheckDiskLabels, write=SetCheckDiskLabels, default=1};
- __property TMultiMode MultiMode = {read=GetMultiMode, write=SetMultiMode, default=0};
- __property bool Busy = {read=FBusy, default=0};
- __property int NumSelected = {read=FNumSelected, nodefault};
- __property int BufferLength = {read=FBufferLength, write=FBufferLength, default=0};
- __property bool ImproperZip = {read=FImproperZip, default=0};
- __property int BufferedStreamSize = {read=FBufferedStreamSize, write=FBufferedStreamSize, default=8192
- };
-
- __published:
- __property int ThisVersion = {read=FThisVersion, write=SetThisVersion, default=222};
- __property System::AnsiString ZipName = {read=GetZipName, write=SetZipName};
- __property System::AnsiString DestDir = {read=GetDestDir, write=SetDestDir};
- __property System::AnsiString RootDir = {read=FRootDir, write=SetRootDir};
- __property Kpzipobj::TZipSortMode SortMode = {read=FSortMode, write=FSortMode, default=7};
- __property bool RecreateDirs = {read=FReCreateDir, write=FReCreateDir, default=0};
- __property TUZOverwriteMode OverwriteMode = {read=FOverwriteMode, write=FOverwriteMode, default=0};
-
- __property Classes::TStrings* FilesList = {read=FFilesList, write=SetFilesList};
- __property bool DoAll = {read=FDoAll, write=FDoAll, default=0};
- __property TIncompleteZipMode IncompleteZipMode = {read=FIncompleteZipMode, write=FIncompleteZipMode
- , default=0};
- __property bool KeepZipOpen = {read=FKeepZipOpen, write=FKeepZipOpen, default=0};
- __property bool DoProcessMessages = {read=FDoProcessMessages, write=FDoProcessMessages, default=1};
-
- __property bool RetainAttributes = {read=FRetainAttributes, write=FRetainAttributes, default=1};
- __property bool ReplaceReadOnly = {read=FReplaceReadOnly, write=FReplaceReadOnly, default=0};
- __property bool FlushFilesOnClose = {read=FFlushFilesOnClose, write=FFlushFilesOnClose, default=0};
-
- __property TStartUnzipInfo OnStartUnZipInfo = {read=FOnStartUnzipInfo, write=FOnStartUnzipInfo};
- __property TFilePercentDone OnFilePercentDone = {read=FOnFilePercentDone, write=FOnFilePercentDone}
- ;
- __property TTotalPercentDone OnTotalPercentDone = {read=FOnTotalPercentDone, write=FOnTotalPercentDone
- };
- __property TStartUnZipEvent OnStartUnZip = {read=FOnStartUnZip, write=FOnStartUnZip};
- __property TEndUnZipEvent OnEndUnZip = {read=FOnEndUnZip, write=FOnEndUnZip};
- __property TPromptForOverwrite OnPromptForOverwrite = {read=FOnPromptForOverwrite, write=FOnPromptForOverwrite
- };
- __property TSkippingFile OnSkippingFile = {read=FOnSkippingFile, write=FOnSkippingFile};
- __property TBadPassword OnBadPassword = {read=FOnBadPassword, write=FOnBadPassword};
- __property TBadCRC OnBadCRC = {read=FOnBadCRC, write=FOnBadCRC};
- __property TIncompleteZip OnInCompleteZip = {read=FOnInCompleteZip, write=FOnInCompleteZip};
- __property TGetNextDisk OnGetNextDisk = {read=FOnGetNextDisk, write=FOnGetNextDisk};
- __property TUnZipComplete OnUnZipComplete = {read=FOnUnzipComplete, write=FOnUnzipComplete};
- __property TGetNextBuffer OnGetNextBuffer = {read=FOnGetNextBuffer, write=FOnGetNextBuffer};
- };
-
- //-- var, const, procedure ---------------------------------------------------
- #define kpThisVersion (Byte)(222)
- #define DEF_BUFSTREAMSIZE (Word)(8192)
- extern PACKAGE Dialogs::TOpenDialog* OpenZipDlg;
- extern PACKAGE bool __fastcall DelphiIsRunning(void);
- extern PACKAGE void __fastcall Register(void);
-
- } /* namespace Vclunzip */
- #if !defined(NO_IMPLICIT_NAMESPACE_USE)
- using namespace Vclunzip;
- #endif
- //-- end unit ----------------------------------------------------------------
- #endif // VCLUnZip
-